import { request } from "../utils/http";

export function querycrelist(params) {
  return request({
    url: "/api/pm/integralBillList",
    ...params,
    method: "GET"
  })
}
//获取积分商城积分商品列表
export function querystorelist(params) {
  return request({
    url: "/api/pm/goodsList",
    ...params,
    method: "GET"
  })
}
//获取积分商城兑换记录
export function listOrder(params) {
  return request({
    url: "/api/pm/listOrder",
    ...params,
    method: "GET"
  })
}
//新增积分商城订单
export function addOrder(params) {
  return request({
    url: "/api/pm/addOrder",
    ...params,
    method: "POST"
  })
}
//商城订单确认收货
export function confirmOrder(id,callBack) {
  return request({
    url: `/api/pm/confirmOrder/${id}`,
    callBack,
    method: "PUT"
  })
}
//取消商城订单
export function cancelOrder(id,callBack) {
  return request({
    url: `/api/pm/cancelOrder/${id}`,
    callBack,
    method: "PUT"
  })
}